package functions;

public abstract class MoveFunction implements Cloneable {
	protected int x = 0;
	protected boolean real = false;
	
	public abstract double getY(double x);
	public int getIntY(double x) { return (int) getY(x); }
	
	public double getRealNextY() { return getY(x++); }
	public int getNextY() { return getIntY(x++); }

	public double getRealActualY() { return getY(x); }
	public int getActualY() { return getIntY(x); }
	
	public int getX() { return x; }
	
	public void reset() {
		x = 0;
	}
	
	//CLONE
	
	@Override
	public abstract MoveFunction clone() throws CloneNotSupportedException;
	
	protected void clone_help(MoveFunction clone) {
		clone.real = this.real;
		clone.x = this.x;
	}
}
